package o;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.huawei.hms.support.api.entity.pay.HwPayConstant;
import java.util.HashMap;
import java.util.Map;

public final class den {

    public static class d {
        private int ˎ;
        private int ˏ;

        public d(int i, int i2) {
            this.ˎ = i;
            this.ˏ = i2;
        }
    }

    public static void ˊ(Context context, String str, int i, String str2) {
        ˎ(context, str, i, str2, new d(-1, -1));
    }

    private static void ˎ(Context context, String str, int i, String str2, d dVar) {
        Object ˊ = cej.ˊ(str, "aId");
        if (!TextUtils.isEmpty(ˊ)) {
            ˊ(context, i, ˊ, str2, dVar);
        }
    }

    public static void ˊ(Context context, int i, String str, String str2, d dVar) {
        Object ˋ = dep.ˊ().ˋ();
        if (!TextUtils.isEmpty(ˋ)) {
            Intent intent = new Intent("com.huawei.wlan");
            Bundle bundle = new Bundle();
            Map hashMap = new HashMap();
            hashMap.put("aId", str);
            hashMap.put("msgType", String.valueOf(i));
            hashMap.put("appId", str2);
            bundle.putString("aId", str);
            bundle.putString("msgType", String.valueOf(i));
            bundle.putString("appId", str2);
            if (dVar != null) {
                if (dVar.ˎ > 0 && dVar.ˏ > 0) {
                    hashMap.put("giftUnit", String.valueOf(dVar.ˎ));
                    hashMap.put("giftTime", String.valueOf(dVar.ˏ));
                    bundle.putInt("giftUnit", dVar.ˎ);
                    bundle.putInt("giftTime", dVar.ˏ);
                }
                bundle.putString(HwPayConstant.KEY_SIGN, deo.ॱ(hashMap, ˋ));
                intent.putExtras(bundle);
                context.sendBroadcast(intent);
            }
        }
    }
}
